﻿@model BanUserEditModel
@{
    string trueName = ViewData.Get<string>("UserTureName", "");
}
@Html.AntiForgeryToken()
<div class="panel">
    <div class="panel-body">
        @using (Html.BeginAjaxForm("_BanUser", "ControlPanel", "", FormMethod.Post, new AjaxFormOptions { OnSuccessCallBack = "BanUserCallBack" }, new { @class = "tn-form-validation " }))
        {
        @Html.HiddenFor(m => m.UserId)
            <div class="form-group">
                <div class="row">
                    <div class="col-xs-12" style="width:100px">
                        @Html.LabelFor(m => m.BanDeadline)
                    </div>
                </div>
                <div class="has-feedback">
                    @Html.DatePickerFor(m => m.BanDeadline)
                    <span class="form-control-feedback"><i class="fa fa-calendar"></i></span>
                </div>
                @Html.ValidationMessageFor(m => m.BanDeadline)
            </div>
            <div class="form-group">
                <div class="row">
                    <div class="col-xs-12" style="width:100px">
                        @Html.LabelFor(m => m.BanReason)
                    </div>
                </div>
                @Html.TextBoxFor(m => m.BanReason, htmlAttributes: new { @class = "form-control" })
                @Html.ValidationMessageFor(m => m.BanReason)
            </div>
            <div class="form-group">
                <button type="submit" class="btn btn-primary tn-mr-10 tn-btn-wp">确定</button>
                <button type="button" class="btn btn-default tn-btn-wp" data-dismiss="modal" id="cancel">关闭</button>
            </div>
        }
    </div>
</div>
<script>
    require(['jquery'], function () {
        $(function () {
            $("#registeDate").val("")
        })
       
        //取消
        $("#cancel").click(function () {
            layer.closeAll();
        });

    })
</script>
